<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
     
    </head>
    <body>
        <form method="GET" action="/time">
            <h2 id="time">Press button</h2>
            <button id="gettime" type="button">
                Current time
            </button>
        </form>
           <script>
            
            $(function(){
                $("#gettime").click(function(){
                    var promise =$.getJSON(
                    "http://localhost:8080/comms/time",{tz,"PST"});
            promise.done(function(result){
                if(!result)
                    reutrn;
                $("#time").text("$.getJSON:"+result.time+", offset: "+result.offset);
            });
                });
            });
            
            </script>
    </body>
</html>
